home *** CD-ROM | disk | FTP | other *** search
- /*
- File: DTS_SCSI_Driver.h
-
-
-
-
-
- Unfortunately, no matter how long awaited, it's still not done. In fact, this
- isn't even a release- this is just an image of the code taken in the middle of
- development.
-
- THIS CODE DOES NOT WORK AS A WHOLE. MUCH OF IT IS BUGGY AND / OR INCOMPLETE.
- YOU WOULD HAVE TO BE ABSOLUTELY INSANE TO USE ANY OF THIS CODE IN YOUR
- PROJECT WITHOUT EXTENSIVE THOUGHT, DEBUGGING AND TESTING.
-
-
-
-
-
-
- Contains: SCSI Sample Driver global types, constants, and function prototypes
-
- Written by: Craig Prouse
-
- Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
- <6> 04/24/91 tmd Enum'd csCodes, created driverIconCode
- <5> 11/25/91 chp remove some unnecessary prototypes, reflect changes to the API,
- eliminate an unnecessary drive variable, and general cleanup
- <4> 10/16/91 chp complete preliminary definition of the driver variables
- <3> 10/15/91 chp add some driver variables and remove some unnecessary typedefs
- <2> 10/15/91 chp update header contents
- <1> 10/15/91 chp first checked in
-
- To Do:
- */
-
- #ifndef __DTS_SCSI__
- #define __DTS_SCSI__
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #ifndef __DEVICES__
- #include <Devices.h>
- #endif
-
- // Our driver's name as a Pascal string. This has to match the one in DTS_SCSI_Driver.a!
- #define kDriverName "\P.DTS_SCSI"
-
- // The current version number of our driver. This has to match the one in DTS_SCSI_Driver.a!
- #define kCurrentDriverVersion 1
-
- // The bit in the driver header flags word that controls whether
- // our driver gets accRun calls. We twiddle it to get an extra chance
- // to ensure that our volume gets mounted at boot time, even if it's not
- // the boot volume.
- #define dNeedTime (0x20) /* bit 5 of the driver's flags word */
-
- // The drive queue flag value to mark our drive as non-ejectable
- #define noEjectFlag 0x08
-
- // csCodes for Control routines
- typedef enum {
- killCode = 1, // KillIO translates into this
- verifyCode = 5, // We don't support it, but we need to return noErr
- formatCode = 6, // Finder-level "Erase Disk…" low-level format call (unsupported)
- ejectCode = 7,
- mediaIconCode = 21, // Finder's "give me the disk icon" call *** No support for ID=20, required for Finder 1.1
- deviceIconCode = 23 // "Give me the physical icon" call (DIBadMount)
- } EControlCode;
-
- //
- // A complete drive queue element, including the "pre-element" flags. We insert
- // this to make alignment necessary for the char field.
- //
-
- typedef struct TXDrvQEl {
- unsigned char flags[4]; /* The drive queue element's flags */
- DrvQEl elem; /* The drive queue element itself */
- } TXDrvQEl;
-
- /*
- * The state of one drive, including its drive queue element.
- * (we need one of these for each partition/volume/drive serviced)
- */
- typedef struct TDriveVars {
- short driveID; /* SCSI bus ID of this drive */
- long partitionOffset; /* Block offset to the start of this volume's partition */
- TXDrvQEl driveQElem; /* The complete drive queue element */
- unsigned long driveBlockSize; /* size in bytes of each block on the drive */
- Boolean tickleFlag;
- Boolean blindOK;
- } TDriveVars;
-
-
- #endif
-